package(default_visibility = ["//visibility:public"])

licenses(["notice"])

load(
    "@io_bazel_rules_go//go:def.bzl",
    "go_library",
    "go_test",
)

go_library(
    name = "go_default_library",
    srcs = [
        "abort.go",
        "filter.go",
        "health.go",
        "pjutil.go",
        "pprof.go",
        "tot.go",
        "trigger.go",
    ],
    importpath = "k8s.io/test-infra/prow/pjutil",
    deps = [
        "//prow/apis/prowjobs/v1:go_default_library",
        "//prow/client/clientset/versioned/typed/prowjobs/v1:go_default_library",
        "//prow/config:go_default_library",
        "//prow/crier/reporters/github:go_default_library",
        "//prow/flagutil:go_default_library",
        "//prow/gcsupload:go_default_library",
        "//prow/github:go_default_library",
        "//prow/interrupts:go_default_library",
        "//prow/kube:go_default_library",
        "//prow/pod-utils/decorate:go_default_library",
        "//prow/pod-utils/downwardapi:go_default_library",
        "@com_github_bwmarrin_snowflake//:go_default_library",
        "@com_github_evanphx_json_patch//:go_default_library",
        "@com_github_felixge_fgprof//:go_default_library",
        "@com_github_satori_go_uuid//:go_default_library",
        "@com_github_sirupsen_logrus//:go_default_library",
        "@io_k8s_apimachinery//pkg/apis/meta/v1:go_default_library",
        "@io_k8s_apimachinery//pkg/fields:go_default_library",
        "@io_k8s_apimachinery//pkg/types:go_default_library",
        "@io_k8s_apimachinery//pkg/util/sets:go_default_library",
        "@io_k8s_sigs_controller_runtime//pkg/client:go_default_library",
        "@io_k8s_sigs_yaml//:go_default_library",
    ],
)

filegroup(
    name = "package-srcs",
    srcs = glob(["**"]),
    tags = ["automanaged"],
    visibility = ["//visibility:private"],
)

filegroup(
    name = "all-srcs",
    srcs = [":package-srcs"],
    tags = ["automanaged"],
)

go_test(
    name = "go_default_test",
    srcs = [
        "abort_test.go",
        "filter_test.go",
        "pjutil_test.go",
        "tot_test.go",
        "trigger_test.go",
    ],
    embed = [":go_default_library"],
    deps = [
        "//prow/apis/prowjobs/v1:go_default_library",
        "//prow/client/clientset/versioned/fake:go_default_library",
        "//prow/config:go_default_library",
        "//prow/github:go_default_library",
        "//prow/kube:go_default_library",
        "@com_github_google_go_cmp//cmp:go_default_library",
        "@com_github_sirupsen_logrus//:go_default_library",
        "@io_k8s_api//core/v1:go_default_library",
        "@io_k8s_apimachinery//pkg/api/equality:go_default_library",
        "@io_k8s_apimachinery//pkg/api/resource:go_default_library",
        "@io_k8s_apimachinery//pkg/apis/meta/v1:go_default_library",
        "@io_k8s_apimachinery//pkg/runtime:go_default_library",
        "@io_k8s_apimachinery//pkg/util/diff:go_default_library",
        "@io_k8s_apimachinery//pkg/util/sets:go_default_library",
        "@io_k8s_apimachinery//pkg/watch:go_default_library",
        "@io_k8s_client_go//testing:go_default_library",
        "@io_k8s_sigs_controller_runtime//pkg/client/fake:go_default_library",
    ],
)
